Skip to content

Fix ManifestEntry.snapshot_id setter writing to wrong index#3257

Open
lawofcycles wants to merge 1 commit intoapache:mainfrom
lawofcycles:fix/manifest-entry-snapshot-id-setter
Open

Fix ManifestEntry.snapshot_id setter writing to wrong index#3257
lawofcycles wants to merge 1 commit intoapache:mainfrom
lawofcycles:fix/manifest-entry-snapshot-id-setter

Conversation

@lawofcycles
Copy link
Copy Markdown

Closes #3256

Rationale for this change

The snapshot_id property setter on ManifestEntry writes to self._data[0] (the status field) instead of self._data[1] (the snapshot_id field). This means that when _inherit_from_manifest() assigns a null snapshot_id from the manifest's added_snapshot_id, the entry's status is corrupted and snapshot_id remains None.

Are these changes tested?

Yes. Added test_inherit_from_manifest_snapshot_id to verify that _inherit_from_manifest() correctly inherits snapshot_id without corrupting the status field.

Are there any user-facing changes?

N/A

The setter wrote to self._data[0] (status) instead of self._data[1]
(snapshot_id), corrupting the status field and leaving snapshot_id
unchanged when _inherit_from_manifest() assigned the inherited value.

Signed-off-by: Sotaro Hikita <bering1814@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ManifestEntry.snapshot_id setter writes to wrong index, corrupting status field

1 participant